import http from '@/utils/axios'

// 获取banner
export function getBannerAPI(params = {}){
  // 默认是1，商品为2
  const { distributionSite = '1'} = params//解构
  return http({
    url:'/home/banner',
    params:{
      distributionSite
    }
  })
}

/**
 * @description: 获取新鲜好物
 * @param {*}
 * @returns {*}
 */
export const findNewAPI = () => {
  return http({
    url:'/home/new'
  })
}

/**
 * @description:获取人气推荐
 * @param {*}
 * @returns {*}
 */
export const getHotAPI = () => {
  return http({
    url:'/home/hot'
  })
}

/**
 * @description 获取产品列表
 * @param {*}
 * @returns {*}
 */
export const getGoodsAPI = () => {
  return http({
    url:'/home/goods'
  })
}